import java.util.Arrays;

public class Test03_xuanze {
    public static void main(String[] args) {
        int[] arr = {9,3,8,10,2,4,11};
        sort(arr);
    }
    public static void sort(int[] arr){
        for (int i = 0; i < arr.length - 1; i++) {
            for (int j = i; j < arr.length - 1; j++) {
                    if(arr[i] > arr[j+1]){
                    int temp = arr[i];
                    arr[i] = arr[j+1];
                    arr[j+1] = temp;
                }
            }
        }
        System.out.println(Arrays.toString(arr));
    }
}
